package com.shm.service;

import com.ruoyi.common.core.domain.entity.Comment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.vo.CommentVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 17526
* @description 针对表【comment(评论表)】的数据库操作Service
* @createDate 2023-08-09 19:41:31
*/
public interface ICommentService extends IService<Comment> {

    List<CommentVo> listCommentVoOfProduct(@Param("productId") Long productId, @Param("userId") Long userId);

    /**
     * 将评论数据封装成树形结构
     * @param commentVoList
     * @return
     */
    List<CommentVo> buildTree(List<CommentVo> commentVoList);

}
